package cn.gdpu.course.dao.impl;

import cn.gdpu.course.dao.CourseStudentDao;
import cn.gdpu.course.dao.MybatisDao;
import cn.gdpu.course.dao.domain.CourseStudent;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2018/3/13.
 */
@Repository
public class CourseStudentDaoImpl extends MybatisDao<CourseStudent> implements CourseStudentDao {
	public boolean save(CourseStudent bean) {
		return this.insert("CourseStudentMapper.insert", bean);
	}

	public boolean delete(CourseStudent bean) {
		return this.insert("CourseStudentMapper.delete", bean);
	}

	public boolean update(CourseStudent bean) {
		return this.insert("CourseStudentMapper.update", bean);
	}

	public List<CourseStudent> find(CourseStudent bean) {
		return this.queryForList("CourseStudentMapper.select", bean);
	}

	@Override
	public List<CourseStudent> findscore(CourseStudent bean) {
		return this.queryForList("CourseStudentMapper.selectscore", bean);
	}

	@Override
	public CourseStudent findById(CourseStudent bean) {
		return this.queryForObject("CourseStudentMapper.selectById", bean);
	}
}
